<?php

namespace Asiah\SiklusBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

class ComponentController extends Controller
{

	public function headerAction()
	{
		$username = null;
		if($this->get('security.context')->isGranted('ROLE_USER')) {
			$usernow = $this->container->get('security.context')->getToken()->getUser();
			$username = $usernow->getUsername();
		}

		$parameter = array ('username'=>$username);
		return $this->render('AsiahSiklusBundle:Component:header.html.twig',$parameter );
	}
}
